<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui" template="ui.xhtml">

	<ui:define name="head">
		<style type="text/css">
.ui-confirm-dialog-severity {
	margin: 0 7px 7px 0;
}
</style>
	</ui:define>
	<ui:define name="content">
		<p:panel header="#{msg.link_style}" id="panel">
			<h:form id="form">
				<p:dataGrid var="style" value="#{StyleBean.listTheme}" columns="3"
					rows="12" paginator="true" paginatorPosition="bottom"
					paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
					rowsPerPageTemplate="9,12,15">
					<p:panel header="#{style.name}" style="text-align:center">
						<h:panelGrid columns="1" style="width:100%">
							<h:inputHidden value="#{style.id}" />
							<p:graphicImage value="/img/themes/#{style.name}.png" />
							<p:column style="width:12%; text-align: center;">
								<p:commandButton icon="accept" title="#{msg.label_apply}"
									actionListener="#{StyleBean.prepareStyle(style.id)}"
									update=":panel" onclick="confirmation.show()" />
							</p:column>
						</h:panelGrid>
					</p:panel>
				</p:dataGrid>
			</h:form>
		</p:panel>
		<p:confirmDialog header="Oooops!!!" severity="alert"
			visible="#{not empty param['expired']}" message="View has expired."
			widgetVar="confirmDlg">
			<p:commandButton type="button" value="OK" onclick="confirmDlg.hide()" />
		</p:confirmDialog>
	</ui:define>
</ui:composition>